Left Termination of the query pattern
mergesort_in_3(g, a, a)
w.r.t. the given Prolog program could successfully be proven:
↳ Prolog
↳ PrologToPiTRSProof
Clauses:
mergesort([], [], Ls).
mergesort(.(X, []), .(X, []), Ls).
mergesort(.(X, .(Y, Xs)), Ys, .(H, Ls)) :- ','(split(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)), ','(mergesort(X1s, Y1s, Ls), ','(mergesort(X2s, Y2s, Ls), merge(Y1s, Y2s, Ys, .(H, Ls))))).
split([], [], [], Ls).
split(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) :- split(Xs, Zs, Ys, Ls).
merge([], Xs, Xs, Ls).
merge(Xs, [], Xs, Ls).
merge(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) :- ','(le(X, Y), merge(Xs, .(Y, Ys), Zs, Ls)).
merge(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) :- ','(gt(X, Y), merge(.(X, Xs), Ys, Zs, Ls)).
gt(s(X), s(Y)) :- gt(X, Y).
gt(s(0), 0).
le(s(X), s(Y)) :- le(X, Y).
le(0, s(0)).
le(0, 0).
Queries:
mergesort(g,a,a).
We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
Pi-finite rewrite system:
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:
MERGESORT_IN(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U11(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
MERGESORT_IN(.(X, .(Y, Xs)), Ys, .(H, Ls)) → SPLIT_IN(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))
SPLIT_IN(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U51(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
SPLIT_IN(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → SPLIT_IN(Xs, Zs, Ys, Ls)
U11(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
U11(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → MERGESORT_IN(X1s, Y1s, Ls)
U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U31(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → MERGESORT_IN(X2s, Y2s, Ls)
U31(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U41(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
U31(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → MERGE_IN(Y1s, Y2s, Ys, .(H, Ls))
MERGE_IN(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U81(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → GT_IN(X, Y)
GT_IN(s(X), s(Y)) → U101(X, Y, gt_in(X, Y))
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
U81(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U91(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
U81(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → MERGE_IN(.(X, Xs), Ys, Zs, Ls)
MERGE_IN(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U61(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → LE_IN(X, Y)
LE_IN(s(X), s(Y)) → U111(X, Y, le_in(X, Y))
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
U61(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U71(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
U61(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → MERGE_IN(Xs, .(Y, Ys), Zs, Ls)
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
U111(x1, x2, x3) = U111(x3)
U11(x1, x2, x3, x4, x5, x6, x7) = U11(x7)
U21(x1, x2, x3, x4, x5, x6, x7, x8) = U21(x7, x8)
U31(x1, x2, x3, x4, x5, x6, x7, x8) = U31(x7, x8)
U71(x1, x2, x3, x4, x5, x6, x7, x8) = U71(x1, x8)
LE_IN(x1, x2) = LE_IN(x1, x2)
MERGESORT_IN(x1, x2, x3) = MERGESORT_IN(x1)
U81(x1, x2, x3, x4, x5, x6, x7, x8) = U81(x1, x2, x3, x4, x8)
SPLIT_IN(x1, x2, x3, x4) = SPLIT_IN(x1)
MERGE_IN(x1, x2, x3, x4) = MERGE_IN(x1, x2)
U101(x1, x2, x3) = U101(x3)
U51(x1, x2, x3, x4, x5, x6, x7) = U51(x1, x7)
U41(x1, x2, x3, x4, x5, x6, x7) = U41(x7)
U61(x1, x2, x3, x4, x5, x6, x7, x8) = U61(x1, x2, x3, x4, x8)
GT_IN(x1, x2) = GT_IN(x1, x2)
U91(x1, x2, x3, x4, x5, x6, x7, x8) = U91(x3, x8)
We have to consider all (P,R,Pi)-chains
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
Pi DP problem:
The TRS P consists of the following rules:
MERGESORT_IN(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U11(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
MERGESORT_IN(.(X, .(Y, Xs)), Ys, .(H, Ls)) → SPLIT_IN(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))
SPLIT_IN(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U51(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
SPLIT_IN(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → SPLIT_IN(Xs, Zs, Ys, Ls)
U11(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
U11(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → MERGESORT_IN(X1s, Y1s, Ls)
U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U31(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → MERGESORT_IN(X2s, Y2s, Ls)
U31(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U41(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
U31(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → MERGE_IN(Y1s, Y2s, Ys, .(H, Ls))
MERGE_IN(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U81(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → GT_IN(X, Y)
GT_IN(s(X), s(Y)) → U101(X, Y, gt_in(X, Y))
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
U81(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U91(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
U81(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → MERGE_IN(.(X, Xs), Ys, Zs, Ls)
MERGE_IN(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U61(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → LE_IN(X, Y)
LE_IN(s(X), s(Y)) → U111(X, Y, le_in(X, Y))
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
U61(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U71(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
U61(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → MERGE_IN(Xs, .(Y, Ys), Zs, Ls)
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
U111(x1, x2, x3) = U111(x3)
U11(x1, x2, x3, x4, x5, x6, x7) = U11(x7)
U21(x1, x2, x3, x4, x5, x6, x7, x8) = U21(x7, x8)
U31(x1, x2, x3, x4, x5, x6, x7, x8) = U31(x7, x8)
U71(x1, x2, x3, x4, x5, x6, x7, x8) = U71(x1, x8)
LE_IN(x1, x2) = LE_IN(x1, x2)
MERGESORT_IN(x1, x2, x3) = MERGESORT_IN(x1)
U81(x1, x2, x3, x4, x5, x6, x7, x8) = U81(x1, x2, x3, x4, x8)
SPLIT_IN(x1, x2, x3, x4) = SPLIT_IN(x1)
MERGE_IN(x1, x2, x3, x4) = MERGE_IN(x1, x2)
U101(x1, x2, x3) = U101(x3)
U51(x1, x2, x3, x4, x5, x6, x7) = U51(x1, x7)
U41(x1, x2, x3, x4, x5, x6, x7) = U41(x7)
U61(x1, x2, x3, x4, x5, x6, x7, x8) = U61(x1, x2, x3, x4, x8)
GT_IN(x1, x2) = GT_IN(x1, x2)
U91(x1, x2, x3, x4, x5, x6, x7, x8) = U91(x3, x8)
We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 5 SCCs with 11 less nodes.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
LE_IN(x1, x2) = LE_IN(x1, x2)
We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
LE_IN(s(X), s(Y)) → LE_IN(X, Y)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- LE_IN(s(X), s(Y)) → LE_IN(X, Y)
The graph contains the following edges 1 > 1, 2 > 2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
GT_IN(x1, x2) = GT_IN(x1, x2)
We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
GT_IN(s(X), s(Y)) → GT_IN(X, Y)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- GT_IN(s(X), s(Y)) → GT_IN(X, Y)
The graph contains the following edges 1 > 1, 2 > 2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → MERGE_IN(Xs, .(Y, Ys), Zs, Ls)
MERGE_IN(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U61(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U81(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
U81(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → MERGE_IN(.(X, Xs), Ys, Zs, Ls)
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
U81(x1, x2, x3, x4, x5, x6, x7, x8) = U81(x1, x2, x3, x4, x8)
MERGE_IN(x1, x2, x3, x4) = MERGE_IN(x1, x2)
U61(x1, x2, x3, x4, x5, x6, x7, x8) = U61(x1, x2, x3, x4, x8)
We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → MERGE_IN(Xs, .(Y, Ys), Zs, Ls)
MERGE_IN(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U61(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U81(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
U81(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → MERGE_IN(.(X, Xs), Ys, Zs, Ls)
The TRS R consists of the following rules:
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
The argument filtering Pi contains the following mapping:
.(x1, x2) = .(x1, x2)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U81(x1, x2, x3, x4, x5, x6, x7, x8) = U81(x1, x2, x3, x4, x8)
MERGE_IN(x1, x2, x3, x4) = MERGE_IN(x1, x2)
U61(x1, x2, x3, x4, x5, x6, x7, x8) = U61(x1, x2, x3, x4, x8)
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
U81(X, Xs, Y, Ys, gt_out) → MERGE_IN(.(X, Xs), Ys)
MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
MERGE_IN(.(X, Xs), .(Y, Ys)) → U81(X, Xs, Y, Ys, gt_in(X, Y))
The TRS R consists of the following rules:
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U11(le_out) → le_out
U10(gt_out) → gt_out
The set Q consists of the following terms:
le_in(x0, x1)
gt_in(x0, x1)
U11(x0)
U10(x0)
We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
MERGE_IN(.(X, Xs), .(Y, Ys)) → U81(X, Xs, Y, Ys, gt_in(X, Y))
The remaining pairs can at least be oriented weakly.
U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
U81(X, Xs, Y, Ys, gt_out) → MERGE_IN(.(X, Xs), Ys)
MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
Used ordering: Combined order from the following AFS and order.
U61(x1, x2, x3, x4, x5) = U61(x3, x4)
le_out = le_out
MERGE_IN(x1, x2) = x2
.(x1, x2) = .(x1, x2)
U81(x1, x2, x3, x4, x5) = x4
gt_out = gt_out
le_in(x1, x2) = le_in(x1, x2)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s
U10(x1) = U10
0 = 0
U11(x1) = x1
Recursive path order with status [2].
Quasi-Precedence:
[U6^12, .2, lein2] > [gtin2, s] > leout
[U6^12, .2, lein2] > [gtin2, s] > gtout
[U6^12, .2, lein2] > [gtin2, s] > U10
Status: leout: multiset
U10: multiset
0: multiset
s: multiset
.2: multiset
lein2: multiset
U6^12: multiset
gtout: multiset
gtin2: multiset
The following usable rules [17] were oriented:
none
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
U81(X, Xs, Y, Ys, gt_out) → MERGE_IN(.(X, Xs), Ys)
MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
The TRS R consists of the following rules:
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U11(le_out) → le_out
U10(gt_out) → gt_out
The set Q consists of the following terms:
le_in(x0, x1)
gt_in(x0, x1)
U11(x0)
U10(x0)
We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
The TRS R consists of the following rules:
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U11(le_out) → le_out
U10(gt_out) → gt_out
The set Q consists of the following terms:
le_in(x0, x1)
gt_in(x0, x1)
U11(x0)
U10(x0)
We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
The TRS R consists of the following rules:
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
The set Q consists of the following terms:
le_in(x0, x1)
gt_in(x0, x1)
U11(x0)
U10(x0)
We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
gt_in(x0, x1)
U10(x0)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
The TRS R consists of the following rules:
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
The set Q consists of the following terms:
le_in(x0, x1)
U11(x0)
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- MERGE_IN(.(X, Xs), .(Y, Ys)) → U61(X, Xs, Y, Ys, le_in(X, Y))
The graph contains the following edges 1 > 1, 1 > 2, 2 > 3, 2 > 4
- U61(X, Xs, Y, Ys, le_out) → MERGE_IN(Xs, .(Y, Ys))
The graph contains the following edges 2 >= 1
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
SPLIT_IN(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → SPLIT_IN(Xs, Zs, Ys, Ls)
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
SPLIT_IN(x1, x2, x3, x4) = SPLIT_IN(x1)
We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
Pi DP problem:
The TRS P consists of the following rules:
SPLIT_IN(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → SPLIT_IN(Xs, Zs, Ys, Ls)
R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2) = .(x1, x2)
SPLIT_IN(x1, x2, x3, x4) = SPLIT_IN(x1)
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
Q DP problem:
The TRS P consists of the following rules:
SPLIT_IN(.(X, Xs)) → SPLIT_IN(Xs)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- SPLIT_IN(.(X, Xs)) → SPLIT_IN(Xs)
The graph contains the following edges 1 > 1
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
Pi DP problem:
The TRS P consists of the following rules:
U11(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
U21(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → MERGESORT_IN(X2s, Y2s, Ls)
U11(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → MERGESORT_IN(X1s, Y1s, Ls)
MERGESORT_IN(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U11(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs)), Ys, .(H, Ls)) → U1(X, Y, Xs, Ys, H, Ls, split_in(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls)))
split_in(.(X, Xs), .(X, Ys), Zs, .(H, Ls)) → U5(X, Xs, Ys, Zs, H, Ls, split_in(Xs, Zs, Ys, Ls))
split_in([], [], [], Ls) → split_out([], [], [], Ls)
U5(X, Xs, Ys, Zs, H, Ls, split_out(Xs, Zs, Ys, Ls)) → split_out(.(X, Xs), .(X, Ys), Zs, .(H, Ls))
U1(X, Y, Xs, Ys, H, Ls, split_out(.(X, .(Y, Xs)), X1s, X2s, .(H, Ls))) → U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_in(X1s, Y1s, Ls))
mergesort_in(.(X, []), .(X, []), Ls) → mergesort_out(.(X, []), .(X, []), Ls)
mergesort_in([], [], Ls) → mergesort_out([], [], Ls)
U2(X, Y, Xs, Ys, H, Ls, X2s, mergesort_out(X1s, Y1s, Ls)) → U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_in(X2s, Y2s, Ls))
U3(X, Y, Xs, Ys, H, Ls, Y1s, mergesort_out(X2s, Y2s, Ls)) → U4(X, Y, Xs, Ys, H, Ls, merge_in(Y1s, Y2s, Ys, .(H, Ls)))
merge_in(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls)) → U8(X, Xs, Y, Ys, Zs, H, Ls, gt_in(X, Y))
gt_in(s(0), 0) → gt_out(s(0), 0)
gt_in(s(X), s(Y)) → U10(X, Y, gt_in(X, Y))
U10(X, Y, gt_out(X, Y)) → gt_out(s(X), s(Y))
U8(X, Xs, Y, Ys, Zs, H, Ls, gt_out(X, Y)) → U9(X, Xs, Y, Ys, Zs, H, Ls, merge_in(.(X, Xs), Ys, Zs, Ls))
merge_in(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls)) → U6(X, Xs, Y, Ys, Zs, H, Ls, le_in(X, Y))
le_in(0, 0) → le_out(0, 0)
le_in(0, s(0)) → le_out(0, s(0))
le_in(s(X), s(Y)) → U11(X, Y, le_in(X, Y))
U11(X, Y, le_out(X, Y)) → le_out(s(X), s(Y))
U6(X, Xs, Y, Ys, Zs, H, Ls, le_out(X, Y)) → U7(X, Xs, Y, Ys, Zs, H, Ls, merge_in(Xs, .(Y, Ys), Zs, Ls))
merge_in(Xs, [], Xs, Ls) → merge_out(Xs, [], Xs, Ls)
merge_in([], Xs, Xs, Ls) → merge_out([], Xs, Xs, Ls)
U7(X, Xs, Y, Ys, Zs, H, Ls, merge_out(Xs, .(Y, Ys), Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(X, Zs), .(H, Ls))
U9(X, Xs, Y, Ys, Zs, H, Ls, merge_out(.(X, Xs), Ys, Zs, Ls)) → merge_out(.(X, Xs), .(Y, Ys), .(Y, Zs), .(H, Ls))
U4(X, Y, Xs, Ys, H, Ls, merge_out(Y1s, Y2s, Ys, .(H, Ls))) → mergesort_out(.(X, .(Y, Xs)), Ys, .(H, Ls))
The argument filtering Pi contains the following mapping:
mergesort_in(x1, x2, x3) = mergesort_in(x1)
.(x1, x2) = .(x1, x2)
U1(x1, x2, x3, x4, x5, x6, x7) = U1(x7)
split_in(x1, x2, x3, x4) = split_in(x1)
U5(x1, x2, x3, x4, x5, x6, x7) = U5(x1, x7)
[] = []
split_out(x1, x2, x3, x4) = split_out(x2, x3)
U2(x1, x2, x3, x4, x5, x6, x7, x8) = U2(x7, x8)
mergesort_out(x1, x2, x3) = mergesort_out(x2)
U3(x1, x2, x3, x4, x5, x6, x7, x8) = U3(x7, x8)
U4(x1, x2, x3, x4, x5, x6, x7) = U4(x7)
merge_in(x1, x2, x3, x4) = merge_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6, x7, x8) = U8(x1, x2, x3, x4, x8)
gt_in(x1, x2) = gt_in(x1, x2)
s(x1) = s(x1)
0 = 0
gt_out(x1, x2) = gt_out
U10(x1, x2, x3) = U10(x3)
U9(x1, x2, x3, x4, x5, x6, x7, x8) = U9(x3, x8)
U6(x1, x2, x3, x4, x5, x6, x7, x8) = U6(x1, x2, x3, x4, x8)
le_in(x1, x2) = le_in(x1, x2)
le_out(x1, x2) = le_out
U11(x1, x2, x3) = U11(x3)
U7(x1, x2, x3, x4, x5, x6, x7, x8) = U7(x1, x8)
merge_out(x1, x2, x3, x4) = merge_out(x3)
U11(x1, x2, x3, x4, x5, x6, x7) = U11(x7)
U21(x1, x2, x3, x4, x5, x6, x7, x8) = U21(x7, x8)
MERGESORT_IN(x1, x2, x3) = MERGESORT_IN(x1)
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
U21(X2s, mergesort_out(Y1s)) → MERGESORT_IN(X2s)
MERGESORT_IN(.(X, .(Y, Xs))) → U11(split_in(.(X, .(Y, Xs))))
U11(split_out(X1s, X2s)) → U21(X2s, mergesort_in(X1s))
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs))) → U1(split_in(.(X, .(Y, Xs))))
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
U1(split_out(X1s, X2s)) → U2(X2s, mergesort_in(X1s))
mergesort_in(.(X, [])) → mergesort_out(.(X, []))
mergesort_in([]) → mergesort_out([])
U2(X2s, mergesort_out(Y1s)) → U3(Y1s, mergesort_in(X2s))
U3(Y1s, mergesort_out(Y2s)) → U4(merge_in(Y1s, Y2s))
merge_in(.(X, Xs), .(Y, Ys)) → U8(X, Xs, Y, Ys, gt_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U8(X, Xs, Y, Ys, gt_out) → U9(Y, merge_in(.(X, Xs), Ys))
merge_in(.(X, Xs), .(Y, Ys)) → U6(X, Xs, Y, Ys, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U6(X, Xs, Y, Ys, le_out) → U7(X, merge_in(Xs, .(Y, Ys)))
merge_in(Xs, []) → merge_out(Xs)
merge_in([], Xs) → merge_out(Xs)
U7(X, merge_out(Zs)) → merge_out(.(X, Zs))
U9(Y, merge_out(Zs)) → merge_out(.(Y, Zs))
U4(merge_out(Ys)) → mergesort_out(Ys)
The set Q consists of the following terms:
mergesort_in(x0)
split_in(x0)
U5(x0, x1)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule MERGESORT_IN(.(X, .(Y, Xs))) → U11(split_in(.(X, .(Y, Xs)))) at position [0] we obtained the following new rules:
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, split_in(.(Y, Xs))))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
Q DP problem:
The TRS P consists of the following rules:
U21(X2s, mergesort_out(Y1s)) → MERGESORT_IN(X2s)
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
U11(split_out(X1s, X2s)) → U21(X2s, mergesort_in(X1s))
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, split_in(.(Y, Xs))))
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs))) → U1(split_in(.(X, .(Y, Xs))))
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
U1(split_out(X1s, X2s)) → U2(X2s, mergesort_in(X1s))
mergesort_in(.(X, [])) → mergesort_out(.(X, []))
mergesort_in([]) → mergesort_out([])
U2(X2s, mergesort_out(Y1s)) → U3(Y1s, mergesort_in(X2s))
U3(Y1s, mergesort_out(Y2s)) → U4(merge_in(Y1s, Y2s))
merge_in(.(X, Xs), .(Y, Ys)) → U8(X, Xs, Y, Ys, gt_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U8(X, Xs, Y, Ys, gt_out) → U9(Y, merge_in(.(X, Xs), Ys))
merge_in(.(X, Xs), .(Y, Ys)) → U6(X, Xs, Y, Ys, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U6(X, Xs, Y, Ys, le_out) → U7(X, merge_in(Xs, .(Y, Ys)))
merge_in(Xs, []) → merge_out(Xs)
merge_in([], Xs) → merge_out(Xs)
U7(X, merge_out(Zs)) → merge_out(.(X, Zs))
U9(Y, merge_out(Zs)) → merge_out(.(Y, Zs))
U4(merge_out(Ys)) → mergesort_out(Ys)
The set Q consists of the following terms:
mergesort_in(x0)
split_in(x0)
U5(x0, x1)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, split_in(.(Y, Xs)))) at position [0,1] we obtained the following new rules:
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
U21(X2s, mergesort_out(Y1s)) → MERGESORT_IN(X2s)
U11(split_out(X1s, X2s)) → U21(X2s, mergesort_in(X1s))
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs))) → U1(split_in(.(X, .(Y, Xs))))
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
U1(split_out(X1s, X2s)) → U2(X2s, mergesort_in(X1s))
mergesort_in(.(X, [])) → mergesort_out(.(X, []))
mergesort_in([]) → mergesort_out([])
U2(X2s, mergesort_out(Y1s)) → U3(Y1s, mergesort_in(X2s))
U3(Y1s, mergesort_out(Y2s)) → U4(merge_in(Y1s, Y2s))
merge_in(.(X, Xs), .(Y, Ys)) → U8(X, Xs, Y, Ys, gt_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U8(X, Xs, Y, Ys, gt_out) → U9(Y, merge_in(.(X, Xs), Ys))
merge_in(.(X, Xs), .(Y, Ys)) → U6(X, Xs, Y, Ys, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U6(X, Xs, Y, Ys, le_out) → U7(X, merge_in(Xs, .(Y, Ys)))
merge_in(Xs, []) → merge_out(Xs)
merge_in([], Xs) → merge_out(Xs)
U7(X, merge_out(Zs)) → merge_out(.(X, Zs))
U9(Y, merge_out(Zs)) → merge_out(.(Y, Zs))
U4(merge_out(Ys)) → mergesort_out(Ys)
The set Q consists of the following terms:
mergesort_in(x0)
split_in(x0)
U5(x0, x1)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
U21(X2s, mergesort_out(Y1s)) → MERGESORT_IN(X2s)
The remaining pairs can at least be oriented weakly.
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
U11(split_out(X1s, X2s)) → U21(X2s, mergesort_in(X1s))
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( U3(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( le_in(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( U5(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( mergesort_in(x1) ) = | | + | | · | x1 |
M( mergesort_out(x1) ) = | | + | | · | x1 |
M( gt_in(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( U6(x1, ..., x5) ) = | | + | | · | x1 | + | | · | x2 | + | | · | x3 | + | | · | x4 | + | | · | x5 |
M( .(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( split_out(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( U2(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( merge_out(x1) ) = | | + | | · | x1 |
M( U7(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( merge_in(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( U9(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( U8(x1, ..., x5) ) = | | + | | · | x1 | + | | · | x2 | + | | · | x3 | + | | · | x4 | + | | · | x5 |
Tuple symbols:
M( MERGESORT_IN(x1) ) = | 0 | + | | · | x1 |
M( U21(x1, x2) ) = | 0 | + | | · | x1 | + | | · | x2 |
Matrix type:
We used a basic matrix type which is not further parametrizeable.
As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:
mergesort_in(.(X, .(Y, Xs))) → U1(split_in(.(X, .(Y, Xs))))
mergesort_in(.(X, [])) → mergesort_out(.(X, []))
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U1(split_out(X1s, X2s)) → U2(X2s, mergesort_in(X1s))
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
U3(Y1s, mergesort_out(Y2s)) → U4(merge_in(Y1s, Y2s))
split_in([]) → split_out([], [])
mergesort_in([]) → mergesort_out([])
split_in(.(X, Xs)) → U5(X, split_in(Xs))
U4(merge_out(Ys)) → mergesort_out(Ys)
gt_in(s(0), 0) → gt_out
U10(gt_out) → gt_out
U2(X2s, mergesort_out(Y1s)) → U3(Y1s, mergesort_in(X2s))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
U11(split_out(X1s, X2s)) → U21(X2s, mergesort_in(X1s))
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs))) → U1(split_in(.(X, .(Y, Xs))))
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
U1(split_out(X1s, X2s)) → U2(X2s, mergesort_in(X1s))
mergesort_in(.(X, [])) → mergesort_out(.(X, []))
mergesort_in([]) → mergesort_out([])
U2(X2s, mergesort_out(Y1s)) → U3(Y1s, mergesort_in(X2s))
U3(Y1s, mergesort_out(Y2s)) → U4(merge_in(Y1s, Y2s))
merge_in(.(X, Xs), .(Y, Ys)) → U8(X, Xs, Y, Ys, gt_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U8(X, Xs, Y, Ys, gt_out) → U9(Y, merge_in(.(X, Xs), Ys))
merge_in(.(X, Xs), .(Y, Ys)) → U6(X, Xs, Y, Ys, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U6(X, Xs, Y, Ys, le_out) → U7(X, merge_in(Xs, .(Y, Ys)))
merge_in(Xs, []) → merge_out(Xs)
merge_in([], Xs) → merge_out(Xs)
U7(X, merge_out(Zs)) → merge_out(.(X, Zs))
U9(Y, merge_out(Zs)) → merge_out(.(Y, Zs))
U4(merge_out(Ys)) → mergesort_out(Ys)
The set Q consists of the following terms:
mergesort_in(x0)
split_in(x0)
U5(x0, x1)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
The TRS R consists of the following rules:
mergesort_in(.(X, .(Y, Xs))) → U1(split_in(.(X, .(Y, Xs))))
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
U1(split_out(X1s, X2s)) → U2(X2s, mergesort_in(X1s))
mergesort_in(.(X, [])) → mergesort_out(.(X, []))
mergesort_in([]) → mergesort_out([])
U2(X2s, mergesort_out(Y1s)) → U3(Y1s, mergesort_in(X2s))
U3(Y1s, mergesort_out(Y2s)) → U4(merge_in(Y1s, Y2s))
merge_in(.(X, Xs), .(Y, Ys)) → U8(X, Xs, Y, Ys, gt_in(X, Y))
gt_in(s(0), 0) → gt_out
gt_in(s(X), s(Y)) → U10(gt_in(X, Y))
U10(gt_out) → gt_out
U8(X, Xs, Y, Ys, gt_out) → U9(Y, merge_in(.(X, Xs), Ys))
merge_in(.(X, Xs), .(Y, Ys)) → U6(X, Xs, Y, Ys, le_in(X, Y))
le_in(0, 0) → le_out
le_in(0, s(0)) → le_out
le_in(s(X), s(Y)) → U11(le_in(X, Y))
U11(le_out) → le_out
U6(X, Xs, Y, Ys, le_out) → U7(X, merge_in(Xs, .(Y, Ys)))
merge_in(Xs, []) → merge_out(Xs)
merge_in([], Xs) → merge_out(Xs)
U7(X, merge_out(Zs)) → merge_out(.(X, Zs))
U9(Y, merge_out(Zs)) → merge_out(.(Y, Zs))
U4(merge_out(Ys)) → mergesort_out(Ys)
The set Q consists of the following terms:
mergesort_in(x0)
split_in(x0)
U5(x0, x1)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
The TRS R consists of the following rules:
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
The set Q consists of the following terms:
mergesort_in(x0)
split_in(x0)
U5(x0, x1)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
mergesort_in(x0)
U1(x0)
U2(x0, x1)
U3(x0, x1)
merge_in(x0, x1)
gt_in(x0, x1)
U10(x0)
U8(x0, x1, x2, x3, x4)
le_in(x0, x1)
U11(x0)
U6(x0, x1, x2, x3, x4)
U7(x0, x1)
U9(x0, x1)
U4(x0)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
The TRS R consists of the following rules:
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
The set Q consists of the following terms:
split_in(x0)
U5(x0, x1)
We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
MERGESORT_IN(.(X, .(Y, Xs))) → U11(U5(X, U5(Y, split_in(Xs))))
The remaining pairs can at least be oriented weakly.
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( U5(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( split_out(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
M( .(x1, x2) ) = | | + | | · | x1 | + | | · | x2 |
Tuple symbols:
M( MERGESORT_IN(x1) ) = | 1 | + | | · | x1 |
Matrix type:
We used a basic matrix type which is not further parametrizeable.
As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
split_in(.(X, Xs)) → U5(X, split_in(Xs))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
U11(split_out(X1s, X2s)) → MERGESORT_IN(X1s)
The TRS R consists of the following rules:
split_in(.(X, Xs)) → U5(X, split_in(Xs))
split_in([]) → split_out([], [])
U5(X, split_out(Zs, Ys)) → split_out(.(X, Ys), Zs)
The set Q consists of the following terms:
split_in(x0)
U5(x0, x1)
We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.